1. Cross Reference to Related Applications
This application is based on Japanese Patent Application 2006-241580 filed on Sep. 6, 2006. This application aims at the benefit of priority from the Japanese Patent Application, so that the descriptions of which are all incorporated herein by reference.
2. Field of the Invention
The present invention relates to data processors for processing pieces of data being successively sampled at intervals.
3. Description of the Related Art
In engine control, cylinder pressure sensors, in other words, combustion pressure sensors, are installed in respective cylinders of an internal combustion engine. The cylinder pressure sensors work to measure individual pressures in the respective cylinders. Based on the measured individual pressures in the respective cylinders, proper ignition timings and air-fuel ratios (A/F ratios) for the respective cylinders are achieved. Such engine control using the pressures in respective cylinders are disclosed in U.S. Pat. No. 5,738,074 corresponding to Japanese Unexamined Patent Publication No. H09-273437.
Especially, in a diesel engine, individual pressure signals indicative of pressures in respective cylinders measured by the corresponding cylinder pressure sensors are sent therefrom.
Based on the sampled individual pressure signals, referred to CPS signals hereinafter, indicative of the pressures in the respective cylinders, combustion timings for the respective cylinders and combustion states are computed.
Fuel injection timings by injectors for the respective cylinders and fuel injection quantities therefrom are fed back and controlled to match them with the corresponding expected combustion timings and the combustion states. The feedback control can provide effective diesel engines with high output and low emissions.
In addition, the CPS signals are used to detect misfiring and/or knocking in a cylinder of an engine (internal combustion engine).
When such CPS signals are used to control an internal combustion engine, it is preferable to sample discrete values from each of the CPS signals with a high frequency that allows the waveform of each of the CPS signals to be traced.
Then, in engine control, the CPS signal values are sampled every short interval corresponding to crank angle (CA) of 1 degree; this crank angle represents a rotational angle of a crankshaft of an internal combustion engine.
On the other hand, an engine control unit is operative to activate actuators including fuel injectors in synchronization with the rotation of a crankshaft of an engine.
Especially, an engine control unit disclosed in Japanese Unexamined Patent Publication No. 2001-200747 utilizes a rotation signal, which is also called as a crank signal or NE signal generated by a crankshaft sensor. The rotation signal consists of an array of crank pulses corresponding to angular positions of a crankshaft as it rotates. The pulse cycle of the pulse train corresponds to a predetermined angular interval of the crankshaft rotation, such as a predetermined crank angle (CA) of, for example, 10 degrees.
The engine control unit is operative to multiply the frequency of the rotation signal, thereby generating a multiplication clock signal. For details, the multiplication clock signal consists of an array of clock pulses whose clock cycle is a positive integral submultiple of the pulse cycle of the rotation signal. In other words, the clock cycle of the clock pulses of the multiplication clock signal is defined by dividing the pulse cycle of the rotation signal by a multiplication number.
The engine control unit is also operative to increment an angular counter indicative of the crank angle of the crankshaft every clock cycle of the multiplication clock signal. The engine control unit is further operative to control the engine based on the count value of the angular counter in synchronization with the rotation of the engine's crankshaft (the engine speed). The configuration of the engine control unit makes it possible to grasp the crank angle with a resolution that is the multiplication-number times as high as that of the rotation signal.
As means for generating the multiplication clock signal, the engine control unit is provided with an edge time interval measuring counter, an edge time storing unit, and a multiplication counter.
The edge time interval measuring unit is configured to measure a time interval between each significant pulse edge of the rotation signal corresponding to each of the predetermined crank angles.
The edge time storing unit is configured to divide, by a multiplication number N, each time interval measured by the edge time interval measuring counter in response to when each significant pulse edge appears in the rotation signal, thereby storing the divided time intervals.
The multiplication counter is configured to generate pulses as the multiplication clock signal whose pulse cycle corresponds to each of the divided time intervals stored in the edge time storing unit.
Specifically, a pulse cycle of the multiplication clock signal ranging from a current significant pulse edge of the rotation signal to a next significant pulse edge thereof is determined based on a current time interval between the current significant pulse edge of the rotation signal and a previous significant pulse edge thereof.
When the CPS signal for one cylinder of the engine as an example is sampled at regular time intervals corresponding to an angular interval of 1 degree crank angle, for using it to control an engine, each of the sampling timings can be generated based on a count value of an angular counter. The angular counter works to count up by 1 every a significant edge, i.e., either rising or falling edge in the multiplication clock signal appears.
For example, an analog value of the CPS signal is sampled every time the count value of the angular counter increases by a value corresponding to the crank angle of 1 degree to be converted into a piece of digital data (CPS data). The converted pieces of CPS data are stored in a memory.
In the method of sampling an analog value of the CPS signal at the timing of appearance of a significant edge in the multiplication clock signal, the sampling timings may depend on variations in the rotational speed of the crankshaft (engine speed).
Specifically, the cycle of the multiplication clock signal is determined based on a current time interval between the current significant pulse edge of the rotation signal and a previous significant pulse edge thereof. For this reason, if the engine speed varies abruptly, the count value of the angular counter may have an error. This may cause pieces of CPS data sampled based on the count value of the angular counter to be unmatched with corresponding pieces of CPS data that can be actually obtained every time the crankshaft rotates at a constant minute angle.
For the purpose of improving the sampling precision, the applicant's U.S. Pat. No. 7,079,930 corresponding to Japanese Unexamined Patent Publication No. 2005-220796 discloses an apparatus for sampling a CPS signal for a cylinder outputted from a cylinder pressure sensor.
Within a predetermined time frame (data collecting period), the apparatus samples the value of the CPS signal every constant time interval shorter than a minimum one cycle of a pulse array of a pulse signal whose pulse appears each time the crankshaft rotates at a predetermined angle. The apparatus successively converts the sampled values into pieces of digital data and stores them in the memory of the apparatus.
In addition, the apparatus measures a start time when the sampling is executed for the fast time and edge times when significant edges respectively appear in the pulse signal.
Based on the measured start time, the measured edge times, the constant time interval (sampling interval), and the A/D converted pieces of digital data, the apparatus properly obtains digital items of the CPS signal whose intervals respectively correspond to constant angular intervals of the rotation of the crankshaft; each of these angular intervals is lower than the predetermined angle.
These properly obtained A/D converted pieces of data of the CPS signal enable the efficiency of engine control requiring them to improve.
On the other hand, a circuit module capable of operating independently of software-based tasks by a CPU (Central Processing Unit) has been installed in recent microcomputers used for control of automobiles.
Specifically, the circuit module is provided with an ADC (Analog-to-Digital converter) working to convert an input analog signal into a digital sample every constant time interval. The circuit module is also provided with a digital filter working to obtain digital samples that lie within the desired frequency range.
In addition, the circuit module is provided with a DMA (Direct Memory Access) transferring unit, in other words, DMA controller, working to successively transfer the individual digital samples filtered by the digital filter which is independent of the CPU into the memory of the data microprocessor.
The implementation of the techniques disclosed in the U.S. Pat. No. 7,079,930 set forth above using a microcomputer in which such a circuit module has been installed allows:
the sampling and A/D converting of the CPS signal every constant time interval; and
the transferring of the A/D converted pieces of digital data to the memory independently of the operations of the CPU. This makes it possible to reduce the CPU load.
Many DMA transferring units to be installed in microcomputers have an upper limit to the number of digital samples that each of the transferring units can successively transfer.
Let us consider a microcomputer in which only DMA transferring units is configured to implement the techniques disclosed in the U.S. Pat. No. 7,079,930 set forth above.
In this case, it is assumed that the number of digital samples, which should be taken from an input signal, such as the CPS signal, every constant time interval within the predetermined data collecting period and are required to implement the techniques, is greater than the upper limit of the number of digital samples that the DMA transferring unit can successively transfer.
In this assumption, because all of the digital samples required to implement the techniques cannot be stored in the memory, it may be difficult to obtain the number of pieces of digital data, such as pieces of CPS data, which are required to implement the techniques.